package day11demo;
//求两个字符串的乘积
public class Demo5 {
    public static void main(String[] args) {
        String str = "250";
        String sr = "2";
        int sum = stringToNumber(str) * stringToNumber(sr);
        String ssr = sum + "";
        System.out.println(ssr);
    }
    public static int stringToNumber(String s1){
         char[]arr = s1.toCharArray();
         int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            int ge = arr[i] - 48;
            sum = sum * 10 + ge;
        }
        return sum;

    }
}
